<?php

use yii\helpers\Url;

$this->title = '积分明细列表';
?>
<header class="header">
    <a href="javascript:void(0);" onclick="javascript:history.go(-1);return false;">
        <i class="back-icon"></i>
    </a>积分
</header>
<div id="pointer_con" >
    <div class="pointer_title">积分明细列表</div>
    <table  class="pointer_table">
        <thead class="pointer_thead">
        <tr>
            <td align="left" class="list_name">日期</td>
            <td align="left">交易记录</td>
            <td align="right">积分收支</td>
            <td align="right">有效期</td>
        </tr>
        </thead>
        <tbody class="pointer_tbody">
        <!-- <tr>
            <td align="left">2017-07-11</td>
            <td>交易获取</td>
            <td class="pointer_number" align="center">34</td>
            <td align="right">2017-07-11</td>
        </tr> -->
        <?php foreach ($transactions as $trans) { ?>
        <tr>
            <td align="left"><?=date_format(date_create($trans['date']), 'Y-m-d')?></td>
            <td>交易获取</td>
            <td class="pointer_number" align="center"><?=$trans['points']?></td>
            <td align="right"><?=$trans['points_expirydate']?></td>
        </tr>
        <?php } ?>
        </tbody>
    </table>
</div>
<?php echo '<script> var url="'.Url::to(['member/points_detail','code'=>$code]).'" ;var code = "'.$code.'";var token ="'.\Yii::$app->request->getCsrfToken().'" </script>'?>
